home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
midi
/
midifl12.lha
/
midifile.new
/
mfstrings.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-27
|
909b
|
60 lines
#include <stdio.h>
#include <ctype.h>
#include "midifile.h"
FILE *F;
/* mygetc : returns <int> with input variables:
* void:
*/
int mygetc (void)
{
return (getc (F));
}
/* ------------------------------------------------------------------------ */
/* mytext : returns <int> with input variables:
* type:
* leng:
* msg:
*/
int mytext (
int type,
int leng,
char *msg)
{
char *p;
char *ep = msg + leng;
for (p = msg; p < ep; p++)
putchar (isprint (*p) ? *p : '?');
putchar ('\n');
}
/* ------------------------------------------------------------------------ */
/* main : returns <int> with input variables:
* argc:
* argv:
*/
int main (
int argc,
char **argv)
{
if (argc > 1)
F = fopen (argv[1], "r");
else
F = stdin;
Mf_getc = mygetc;
Mf_text = mytext;
midifile ();
exit (0);
}
/* ------------------------------------------------------------------------ */